Skip to content

Conversation

noshiro-pf
Copy link

The schema for jsx-no-constructed-context-values did not seem to satisfy eslint's Rule.RuleMetaData["schema"] type, so I fixed it.

export namespace Rule {
    interface RuleMetaData {
...
        schema?: JSONSchema4 | JSONSchema4[] | undefined;
...
}

@@ -41,7 +41,6 @@ ruleTester.run('react-no-constructed-context-values', rule, {
},
{
code: 'function Component() { const foo = useMemo(() => { return {} }, []); return (<Context.Provider value={foo}></Context.Provider>)}',
options: [{ allowArrowFunctions: true }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i understand that this is incorrect and should be removed.

however, must it be? I'm asking specifically if the schema change causes this to fail. if that's the case for end users, then the schema change is breaking.

@ljharb ljharb force-pushed the master branch 2 times, most recently from 380e32c to 51d342b Compare July 4, 2024 15:25
@ljharb ljharb marked this pull request as draft July 16, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants